<?php

/**
 * DemandeEvaluation form base class.
 *
 * @package    form
 * @subpackage demande_evaluation
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BaseDemandeEvaluationForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'demande_evaluation_id' => new sfWidgetFormInputHidden(),
      'date'                  => new sfWidgetFormDateTime(),
      'evaluateur'            => new sfWidgetFormInput(),
      'demande_id'            => new sfWidgetFormPropelSelect(array('model' => 'Demande', 'add_empty' => true)),
      'is_donnees_dispo'      => new sfWidgetFormInputCheckbox(),
      'is_ok_objectifs_oru'   => new sfWidgetFormInputCheckbox(),
      'is_ok_anonymat'        => new sfWidgetFormInputCheckbox(),
      'interet'               => new sfWidgetFormInput(),
      'commentaire'           => new sfWidgetFormTextarea(),
    ));

    $this->setValidators(array(
      'demande_evaluation_id' => new sfValidatorPropelChoice(array('model' => 'DemandeEvaluation', 'column' => 'demande_evaluation_id', 'required' => false)),
      'date'                  => new sfValidatorDateTime(array('required' => false)),
      'evaluateur'            => new sfValidatorInteger(array('required' => false)),
      'demande_id'            => new sfValidatorPropelChoice(array('model' => 'Demande', 'column' => 'demande_id', 'required' => false)),
      'is_donnees_dispo'      => new sfValidatorBoolean(),
      'is_ok_objectifs_oru'   => new sfValidatorBoolean(array('required' => false)),
      'is_ok_anonymat'        => new sfValidatorBoolean(array('required' => false)),
      'interet'               => new sfValidatorInteger(array('required' => false)),
      'commentaire'           => new sfValidatorString(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('demande_evaluation[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'DemandeEvaluation';
  }


}
